package com.zz.ai.func;

import jdk.jfr.Description;
import org.springframework.ai.model.function.FunctionCallback;
import org.springframework.ai.tool.function.FunctionToolCallback;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FunctionRegistry {

    @Bean
    public FunctionCallback askForLeave(){
        return FunctionCallback.builder().function("askForLeave",new OaService())
                .description("当有人请假时，返回请假天数").inputType(OaService.Request.class).build();
    }

    @Bean
    public FunctionCallback payLimitForAsk(){
        return FunctionCallback.builder().function("payLimitForAsk",new PayLimitService())
                .description("聚餐申请金额，返回金额数").inputType(OaService.Request.class).build();
    }


    @Bean
    public FunctionCallback getHotelAddressFunction(){
        return FunctionCallback.builder().function("getHotelAddress",new GetHotelAddressFunction())
                .description("根据hotelCode，获取http服务地址").inputType(GetHotelAddressFunction.Request.class).build();
    }

    @Bean
    public FunctionCallback doHotelUpdateArticle(){
        return FunctionCallback.builder().function("doHotelUpdateArticle",new HotelUpdateArticleService())
                .description("给酒店(hotelCode)修改这个规格(skuValue)的商品(pluDescript)，价格(price)").inputType(HotelUpdateArticleService.Request.class).build();
    }

}
